<?php
/**
 * entry point for PHP-OpenCloud library
 *
 * @copyright 2013 Rackspace Hosting, Inc.
 * @license http://www.apache.org/licenses/LICENSE-2.0
 */


// Define path to application directory
defined('BASE_PATH')
    || define('BASE_PATH', realpath(__DIR__ . '/../'));

require_once(__DIR__ . '/../library/Autoload.php');

$classLoader = new ClassLoader;
$classLoader->registerNamespaces(array(
	'OpenCloud' => array(BASE_PATH . '/library', __DIR__ . '/../tests'),
        'Backuper' => array(BASE_PATH . '/library')
));

$classLoader->registerPrefix('Zend', array(BASE_PATH . '/library'));
$classLoader->register();

$tempDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . '/landzin_backuper';

if(!file_exists($tempDir)){
    mkdir($tempDir);
}

define('TEMP_DIR', $tempDir);
define('RAXSDK_SSL_VERIFYPEER', false);

require_once(BASE_PATH . '/library/OpenCloud/Globals.php');